﻿namespace Preactor.ObjectModel.BaseTypes.MaterialControl
{
    using System;

    using Preactor.ObjectModel.Attributes;
    using Preactor.ObjectModel.Entities;
    using Preactor.ObjectModel.Interfaces.MaterialControl;

    public class IgnoreShortage : PreactorRecord, IIgnoreShortage
    {
        public IgnoreShortage(PrimaryKey id, PreactorObjectModel preactorObjectModel)
            : base(id, preactorObjectModel)
        {
        }

        [PreactorField("IGNORE SHORTAGES TABLE", FieldDeclarationType.FieldClassification)]
        public int Number { get { return (int)GetValue("Number"); } set { SetValue("Number", value); } }

        [PreactorField("EXTERNAL DEMAND KEY", FieldDeclarationType.FieldClassification)]
        public int ExternalDemandOrder { get { return (int)GetValue("ExternalDemandOrder"); } set { SetValue("ExternalDemandOrder", value); } }

        [PreactorField("INTERNAL DEMAND KEY", FieldDeclarationType.FieldClassification)]
        public int InternalDemandOrder { get { return (int)GetValue("InternalDemandOrder"); } set { SetValue("InternalDemandOrder", value); } }

        [PreactorField("MATERIAL CONTROL PART NO", FieldDeclarationType.FieldClassification)]
        public string PartNumber { get { return (string)GetValue("PartNumber"); } set { SetValue("PartNumber", value); } }

        [PreactorField("SHORTAGE IGNORED", FieldDeclarationType.FieldClassification)]
        public bool IgnoreShortages { get { return (bool)GetValue("IgnoreShortages"); } set { SetValue("IgnoreShortages", value); } }
    }
}